﻿using System;
using System.Collections;

namespace taurus.client
{
    
    /// <summary>
    /// The TArray class.
    /// </summary>
    public interface ITArray
    {
        /// <summary>
        /// The add data wrapper object.
        /// </summary>
        /// <param name="val"></param>
        void add(TDataWrapper val);
        /// <summary>
        /// The add bool
        /// </summary>
        /// <param name="val"></param>
        void addBool(bool val);
        /// <summary>
        /// The add byte
        /// </summary>
        /// <param name="val"></param>
        void addByte(byte val);
        /// <summary>
        /// The add byte array.
        /// </summary>
        /// <param name="val"></param>
        void addByteArray(ByteArray val);
        /// <summary>
        /// The add double.
        /// </summary>
        /// <param name="val"></param>
        void addDouble(double val);
        /// <summary>
        /// The add float.
        /// </summary>
        /// <param name="val"></param>
        void addFloat(float val);
        /// <summary>
        /// The add int.
        /// </summary>
        /// <param name="val"></param>
        void addInt(int val);
        /// <summary>
        /// The add long.
        /// </summary>
        /// <param name="val"></param>
        void addLong(long val);
        /// <summary>
        /// The add null.
        /// </summary>
        void addNull();
        /// <summary>
        /// The add TArray.
        /// </summary>
        /// <param name="val"></param>
        void addTArray(ITArray val);
        /// <summary>
        /// The add TObject.
        /// </summary>
        /// <param name="val"></param>
        void addTObject(ITObject val);
        /// <summary>
        /// The add short.
        /// </summary>
        /// <param name="val"></param>
        void addShort(short val);
        /// <summary>
        /// The add string.
        /// </summary>
        /// <param name="val"></param>
        void addString(string val);
        /// <summary>
        /// The add string.
        /// </summary>
        /// <param name="val"></param>
        void addUtfString(string val);
        /// <summary>
        /// get bool of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        bool getBool(int index);
        /// <summary>
        /// get byte of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        byte getByte(int index);
        /// <summary>
        /// get byte array of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        ByteArray getByteArray(int index);
        /// <summary>
        /// get double of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        double getDouble(int index);
        /// <summary>
        /// get object of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        TDataWrapper get(int index);
        /// <summary>
        /// get float of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        float getFloat(int index);
        /// <summary>
        /// get int of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        int getInt(int index);
        /// <summary>
        /// get long of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        long getLong(int index);
        /// <summary>
        /// get TArray of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        ITArray getTArray(int index);
        /// <summary>
        /// get TObject of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        ITObject getTObject(int index);
        /// <summary>
        /// get short of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        short getShort(int index);
        /// <summary>
        /// get string of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        string getString(int index);
        /// <summary>
        /// get string of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        string getUtfString(int index);
        /// <summary>
        /// Check null object of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        bool isNull(int index);
        /// <summary>
        /// Remove element object of index.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        void del(int index);
        /// <summary>
        /// The Array size.
        /// </summary>
        /// <returns></returns>
        int size();
        /// <summary>
        /// To byte array
        /// </summary>
        /// <returns></returns>
        ByteArray toBinary();
        /// <summary>
        /// to json
        /// </summary>
        /// <returns></returns>
        string toJson();
    }
}

